<?php
namespace app\backend\validate;

use think\Validate;

class Tabs extends Validate
{

    protected $rule =   [
        'tab_name_cn'              => 'require|max:100',
        'tab_name_en'              => 'max:100',
        //'content_cn' => 'require',
        //'content_en' => 'require',

        /* 验证不能为空
        'title_cn'              => 'require|max:20',
         'title_en'              => 'require|max:20',
         'title_introduce_cn' => 'require|max:255',
         'title_introduce_en' => 'require|max:255',
         'content_cn' => 'require|max:255',
         'content_en' => 'require|max:255',*/
    ];

    protected $message  =   [
        'tab_name_cn.require'      => '标题格式不正确',


    ];

    protected $scene = [
        'add' => ['tab_name_cn','tab_name_en'],
        'edit' => ['tab_name_cn','tab_name_en']
    ];

}


